<div class="modal-header">
  <h4 class="modal-title">{{modify.mobile ? '完善账号信息' : '修改初始密码'}}</h4>
</div>
<div class="modal-body">

  <!-- 绑定手机 -->
  <form name="form1" ng-show="modify.mobile" class="form-horizontal form-validation ng-valid-required">
    <div class="form-group">
      <label class="col-lg-3 control-label">绑定手机：</label>
      <div class="col-lg-5">
        <input type="text" class="form-control" ng-model="obj.mobile">
      </div>
      <div class="col-lg-2">
        <button id="send" class="btn btn-default" ng-class="{true: 'disabled active', false: ''}[time.btnable]" 
         style="width:96px" ng-click="sendMsg()">
          <span class="text">发送验证码</span>
          <span class="text-active">{{time.timeout}}(s)</span>
        </button>
      </div>
    </div>
    <div class="form-group">
      <label class="col-lg-3 control-label">验证码：</label>
      <div class="col-lg-4">
        <input type="text" class="form-control" ng-model="obj.code">
      </div>
    </div>
    <div class="form-group">
      <div class="col-lg-6 col-lg-offset-3">
        <label class="control-label text-muted"><i style="color: red">* 绑定的手机号可作为登录账号使用</i></label>
      </div>
    </div>
  </form>

  <!-- 修改初始密码 -->
  <form name="form" ng-show="!modify.mobile && modify.pass" class="form-horizontal form-validation ng-valid-required">
    <div class="form-group">
      <label class="col-lg-3 control-label">旧密码：</label>
      <div class="col-lg-6">
        <input type="password" class="form-control" ng-model="obj.oldpassword" required="">
      </div>
    </div>
    <div class="form-group">
      <label class="col-lg-3 control-label">新密码：</label>
      <div class="col-lg-6">
        <input type="password" class="form-control" maxlength="16" minlength="8" ng-pattern="/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/" 
         name="newpassword" ng-model="obj.newpassword" required="" popover="密码长度在8-16位">
      </div>
      <label class="control-label" ng-show="form.newpassword.$dirty" style="color:red">
        <span ng-show="form.newpassword.$invalid && !form.newpassword.$error.required" class="ng-hide">密码需字母与数字组合</span>
      </label>
    </div>
    <div class="form-group">
      <label class="col-lg-3 control-label">确认密码:</label>
      <div class="col-lg-6">
        <input type="password" class="form-control" ng-model="obj.repassword" name="repassword" 
         ui-validate=" '$value==obj.newpassword' " ui-validate-watch=" 'obj.newpassword' " required="">
      </div>
      <label class="control-label" ng-show="form.repassword.$dirty" style="color:red">
        <span ng-show="form.repassword.$error.validator && !form.repassword.$error.required" class="ng-hide">两次密码不相同!</span>
      </label>
    </div>
    <div class="form-group">
      <div class="col-lg-6 col-lg-offset-3">
        <label class="control-label text-muted"><i style="color: red">* 初始密码不安全，请尽快修改</i></label>
      </div>
    </div>
  </form>

</div>
<div class="modal-footer">
  <button class="btn btn-primary" type="button" ng-show="modify.mobile && modify.pass" ng-click="nextStep()">跳过</button>
  <button class="btn btn-primary" type="button" ng-show="modify.mobile" ng-click="validate()">绑定手机</button>
  <button class="btn btn-success" type="button" ng-show="!modify.mobile && modify.pass" ng-click="save()">确定</button>
  <button class="btn btn-danger" type="button" ng-click="cancel()">关闭</button>
</div>